(handle_single_display_spec): Undo 2007-10-16 changes.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 3 Mar 2008 09:24:57 +0000 (09:24 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 3 Mar 2008 09:24:57 +0000 (09:24 +0000)
Don't pretend as if characters with display property haven't been
consumed for string-replacing-string case.

src/xdisp.c

index 83792108f42e7c8481fade08b24bb9d20f8f353b..f362f2c352f594026121ac58cc25ced38ae5ff4c 100644 (file)
@@ -4301,15 +4301,13 @@ handle_single_display_spec (it, spec, object, overlay, position,
             `display' property yet.  The call to pop_it in
             set_iterator_to_next will clean this up.  */
          if (BUFFERP (object))
-           it->current.pos = start_pos;
+           *position = start_pos;
        }
       else if (CONSP (value) && EQ (XCAR (value), Qspace))
        {
          it->method = GET_FROM_STRETCH;
          it->object = value;
-         it->position = start_pos;
-         if (BUFFERP (object))
-           it->current.pos = start_pos;
+         *position = it->position = start_pos;
        }
 #ifdef HAVE_WINDOW_SYSTEM
       else
@@ -4323,8 +4321,7 @@ handle_single_display_spec (it, spec, object, overlay, position,
          /* Say that we haven't consumed the characters with
             `display' property yet.  The call to pop_it in
             set_iterator_to_next will clean this up.  */
-         if (BUFFERP (object))
-           it->current.pos = start_pos;
+         *position = start_pos;
        }
 #endif /* HAVE_WINDOW_SYSTEM */